#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    const static int N = 50;
    int dp[N] = { 0, 1, 2, 3 };
    int climbStairs(int n) {
        for (int i = 3; i <= n; i++)
        {
            dp[i] = dp[i - 1] + dp[i - 2];
        }
        return dp[n];
    }
};